<html>
<head>
    <meta charset="UTF-8">
    <meta name="format-detection" content="telephone=yes">
    <meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>服务号绑定</title>
    <link rel="stylesheet" type="text/css" href="${ctxStatic}/ajz/mobile/css/iconfont.css">
    <link type="text/css" rel="stylesheet" href="${ctxStatic}/ajz/mobile/css/sf.css"/>
    <link type="text/css" rel="stylesheet" href="${ctxStatic}/ajz/mobile/css/wechatRegister.css" />
    <script type="text/javascript" src="${ctxStatic}/ajz/mobile/js/jquery.min.js"></script>
    <style>

        #gyjzq_bes_inf i,#gyjzq_bes_infT i{
            width: 30%;
            text-align:right;

        }
        #gyjzq_bes_inf b, #gyjzq_bes_infT b{
            width: 60%;

        }
        #gyjzq_bes_inf input,#gyjzq_bes_infT input{
            width: 90%;
        }
        #gyjzq_bes_infB input {
            margin:7px 16px 3px 15px;
        }
        #gyjzq_bes_infB strong {
            float: left;
            display: block;
            width: 100%;
            min-height: 40px;
            line-height: 40px;
            border-bottom: 1px solid #dcdcdc;
        }
        #gyjzq_bes_infT li,#gyjzq_bes_infB li,#gyjzq_bes_inf li,#tp_a01,#tp_a03,#tp_a05,#gyjzq_bes_inf hr,#gyjzq_bes_infT hr,#gyjzq_bes_inB hr{
            display:none;
        }
        .table_text_box2 {
            width: 65%;
            float: left;
        }
        .table_text_box2{
            position: relative;
            top: 4px;
        }
        #na_box li {
            width: 100%;
            float: left;
            height:auto;
        }
        #na_box i {
            width: 30%;
            float: left;
            text-align: right;
        }
        #zhizhao_sel02 {
            margin-top:2px;
            float: left;
        }
        .ul_li_box,.yyzzbox ,#aaadnna,#fanhui{
            display: none;
        }


    </style>

</head>
<body>
<div data-role="page">
    <div data-role="content-floud">

        <form action="fwaddQYInfo" method="post" id="fwaddQYInfo">
            <input type="hidden" id="openid" name="openid" value= ${openid} />
            <input type="hidden" name="danUrls" id="danUrls"/>
            <div class="yyzzbox">
                 <h5 id="imgh5_1">营业执照识别
                    <a class="iconfont icon-angle-up table_photo_min_add_1 " id="tp_2"></a>
                    <a class="iconfont icon-xiafan table_photo_min_add_1 " id="tp_3"></a>
                </h5>
                <ul class="table_photo_min" id="updateimg">
                    <ol>
                        <div style="">
                            <div id="upBox">
                                <div id="inputBox">
                                    <input type="button" name="chooseImage1" title="请选择图片" id="chooseImage1">上传
                                </div>
                                <div id="imgBox">
                                </div>
                            </div>
                        </div>
                    </ol>
                </ul>
                <br><br>
                <div class="hi_degbtnbar_iup bgcolor" style="text-align:center;">
                    <button type="button" onclick="getPicMsg();" class="table_btn xgbtn_1">识 别</button>
                </div>
            </div>
                    <input name="only" type="hidden" id="only" value="0" >
                    <div class="login_titile_bg" style="position: relative;right: 10px;">
                        <img src="${ctxStatic}/ajz/mobile/img/linlne.png">
                    </div>
                    <ul class="login_iup">
                        <li><span>营业执照号码:</span><input type="text" maxlength="50" id="enterpriseId" name="enterpriseId" placeholder="请输入营业执照号码"/></li>
                    </ul>

                    <ul  class="table_information_ipt">
                        <!--<h5>基本信息添加</h5>-->
                        <!--<li ><i>营业执照号:</i><b><input type="text" name="enterpriseId" class="table_text_box2" placeholder="请输入营业执照号码"id="enterpriseId"></b></li>-->

                        <li  class="ul_li_box"><i>企业名称：</i><b><input type="text" id="enterpriseName" name="enterpriseName" class="table_text_box2" placeholder="请输入营业执照名"></b></li>
                            <!--<li><i>营业执照号码:</i><b><input type="text" name="enterpriseId" class="table_text_box2" placeholder="请输入营业执照号码"></b></li>-->
                            <li class="ul_li_box"><i>法代人：</i><b><input type="text" name="chargePerson"  id="chargePerson" class="table_text_box2" placeholder="请输入法定代表人姓名"></b></li>
                            <li class="ul_li_box"><i>法人电话：</i><b><input type="text" name="telephone" class="table_text_box2" placeholder="请输入法人电话"></b></li>
                            <li class="ul_li_box"><i>地址：</i><b><input name="addr" class="table_text_box2"  placeholder="请输入地址"  value="" type="text"></b></li>
                            <li class="ul_li_box"><i>占地面积：</i><b><input name="area" class="table_text_box2"  placeholder="请输入占地面积"  value="" type="text"></b></li>
                            <li class="ul_li_box"><i>联系人：</i><b><input name="contactPerson" class="table_text_box2"  placeholder="请输入负责人姓名"  value="" type="text"></b></li>
                            <li class="ul_li_box"><i>联系电话：</i><b><input name="contactPersontel" class="table_text_box2"  placeholder="请输入手机号"  value="" type="text"></b></li>
                            <li class="ul_li_box"><i>地址：</i><b><input name="addr" class="table_text_box2"  placeholder="请输入地址"  value="" type="text"></b></li>


                            <li class="ul_li_box"><i>所在片区：</i><b>
                        <select name="officeCode" id="zhizhao_sel02">
                            <option value="25">同安园</option>
                            <option value="26">湖里园</option>
                            <option value="27">建材园</option>
                            <option value="28">企业自建地</option>
                            <option value="29">思明园</option>
                        </select>
                            </b></li>
                    </ul>


            <div class="btn_x ">
                <a id="submit_11a" >绑 定</a>
            </div>

            <div class="btn_x" id="aaadnna">
                <a id="btnSub">确 定</a>
            </div>
            <br>
            <!--<div class="hi_degbtnbar_e" id="">-->
                <!--<input id="fanhui" class="xcbtn_m" type="button" value="返回"/>-->
            <!--</div>-->
        </form>
        <br>
        <br>
    </div>
</div>
</body>
<script src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
<script type="text/javascript" charset="utf-8" src="${ctxStatic}/ajz/mobile/js/add_wxpic.js"></script>


<script type="text/javascript">

    wx.config({
        debug: false,
        appId: '${appId}',
        timestamp: '${timestamp}',
        nonceStr: '${nonceStr}',
        signature: '${signature}',
        jsApiList: [
            'chooseImage',
            'previewImage',
            'uploadImage',
            'downloadImage',
            'scanQRCode'
        ]
    });


    $('#tp_a01').click(function () {
        $("#gyjzq_bes_inf li").css("display","none")
        $("#gyjzq_bes_inf hr").css("display","none")
        $("#tp_a01").css("display", "none");
        $("#tp_a02").css("display", "block");
    });
    $('#tp_a02').click(function () {
        $("#gyjzq_bes_inf li").css("display","block")
        $("#gyjzq_bes_inf hr").css("display","block")
        $("#tp_a02").css("display", "none");
        $("#tp_a01").css("display", "block");
    });

    $('#tp_a03').click(function () {
        $("#gyjzq_bes_infT li").css("display","none")
        $("#gyjzq_bes_infT hr").css("display","none")
        $("#tp_a03").css("display", "none");
        $("#tp_a04").css("display", "block");
    });
    $('#tp_a04').click(function () {
        $("#gyjzq_bes_infT li").css("display","block")
        $("#gyjzq_bes_infT hr").css("display","block")
        $("#tp_a04").css("display", "none");
        $("#tp_a03").css("display", "block");
    });

    $('#tp_a05').click(function () {
        $("#gyjzq_bes_infB li").css("display","none")
        $("#gyjzq_bes_infB hr").css("display","none")
        $("#tp_a05").css("display", "none");
        $("#tp_a06").css("display", "block");
    });
    $('#tp_a06').click(function () {
        $("#gyjzq_bes_infB li").css("display","block")
        $("#gyjzq_bes_infB hr").css("display","block")
        $("#tp_a06").css("display", "none");
        $("#tp_a05").css("display", "block");
    });


    $("#submit_11a").click(function () {
        var enterpriseId = $("#enterpriseId").val();
        $.ajax({
            url: "nameCheck",
            type: "POST",
            data: "msg="+enterpriseId,
            dataType: "json",
            async: true,
            success:function(map){
                flag = map.flag;
                if(flag=='fail'){
                    alert("企业未添加，请继续添加")
                    $(".yyzzbox").css("display","block")
                    $(".ul_li_box").css("display","block")
                    $("#aaadnna").css("display","block")
                    $("#aaadnna").parent("div").css("display","block")
                    $("#submit_11a").css("display","none")
                    $("#submit_11a").parent("div").css("display","none")
                    $("#submit_11a").css("display","block")
                    $("#fanhui").css("display","block")
                    $(".login_titile_bg").css("display","none")
                    $(".login_iup").css("display","none")

                }else{
                    alert("已查询到该企业，为您自动绑定该企业");
                    $("#only").val(1);
                    document.getElementById('fwaddQYInfo').submit();
                }
            }
        })
    })

    $("#fanhui").click(function(){

        $(".yyzzbox").css("display","none")
        $(".ul_li_box").css("display","none")
        $("#aaadnna").css("display","none")
        $("#aaadnna").parent("div").css("display","none")
        $("#submit_11a").css("display","block")
        $("#submit_11a").parent("div").css("display","block")
        $("#fanhui").parent("div").css("display","none")
    })

    $("a[id='btnSub']").click(function(){
        document.getElementById('btnSub').submit();
    })

</script>


</html>

